Stream Service
Stream service is one of the service tool of Gcalls. This is the service that is responsible for getting information from the providers and this is the place to provide data about call log and record for other service tools and external systems.
I. Functionality
- Provide for google data studio
II. Packages
1. Dependencies
- @elastic/elasticsearch - The official Node.js client for Elasticsearch. Elasticsearch
- One-to-one mapping with REST API.
- Generalized, pluggable architecture.
- Configurable, automatic discovery of cluster nodes.
- Persistent, Keep-Alive connections.
- Load balancing across all available nodes.
- Child client support.
- TypeScript support out of the box.
- Apicache - A simple API response caching middleware for Express/Node using plain-english durations. Apicache
- Axios-extensions - Axios extensions for retry, throttle and cache. Axios-extensions
- Axios - Promise based HTTP client for the browser and node.js Axios
- Bluebird - Bluebird is a fully featured promise library with focus on innovative features and performance Bluebird
- Body-parser - Node.js body parsing middleware Body-parser
- Dotenv - Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env Dotenv
- Express-session - Simple session middleware for Express Express-session
- Express - Fast, unopinionated, minimalist web framework for node Express
- Grok-js - JavaScript library to parse strings and extract information from structured/unstructured data Grok-js
- Http - Node.js HTTP library Http
- Https - Node.js HTTPS library Https
- Moment-timezone - Parse and display moments in any timezone. Moment-timezone
- Moment - Parse, validate, manipulate, and display dates Moment
- Morgan - HTTP request logger middleware for node.js Morgan
- Mysql - This is a node.js driver for mysql. It is written in JavaScript, does not require compiling, and is 100% MIT licensed. Mysql
- Path - Node.JS path module Path
- Ws - Simple to use, blazing fast and thoroughly tested WebSocket client and server for Node.js Ws
2. Dev dependencies
III. Source tree
.
├── config
│ └── elastic.js
├── Dockerfile
├── .dockerignore
├── .env
├── .gitignore
├── index.js
├── lib
│ ├── access.js
│ ├── auth.js
│ ├── elastic.js
│ ├── fusionpbx.js
│ ├── kazoo.js
│ └── logger.js
├── package.json
├── package-lock.json
└── routes
├── fusionpbx.js
├── gds.js
├── kazoo.js
└── logger.js
IV. Installation
- Clone project
git clone https://gitlab.com/gcalls-opensource/gcallsmiddle.git
- Change dir into streamService folder
cd streamService
- Install packages:
npm install
- Start service:
- run in development
npm run dev
run in production
npm install -g pm2
npm start
VI. Author
- Kim Vũ - Gcalls Engineer
- kim.vu@gcalls.co